﻿using System.Collections.Generic;
using GeneticAlgorithms.Genomes;
using GeneticAlgorithms.Populations;

namespace GeneticAlgorithms.Operators.Selection
{
    /// <summary>
    /// Base interface for all genetic selection operators.
    /// </summary>
    /// <typeparam name="TGenome">The type of the genome.</typeparam>
    /// <typeparam name="TGene">The type of the gene.</typeparam>
    public interface IGeneticSelector<TGenome, TGene>
        where TGenome : IGenome<TGene>
    {
        /// <summary>
        /// Selects the genomes.
        /// </summary>
        /// <param name="population">The population from which 
        /// the selected genomes will be picked.</param>
        /// <param name="selectCount">The count of genomes to select.</param>
        /// <returns>
        /// A genome of selected genomes.
        /// </returns>
        IEnumerable<TGenome> SelectGenomes(
            IPopulation<TGenome, TGene> population,
            int selectCount);
    }
}
